<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
echo 'collectie';
foreach (glob("./collectie/*") as $cat) {
    $temp = explode('/', $cat);
    echo $temp[2].'<br />';
    echo '<ul>';
        foreach (glob("$cat/*") as $brand) {
            $temp = explode('/', $brand);
             echo '<li>'.$temp[3].'<br />';
             echo '<ul>';
             foreach(glob($brand.'/*') as $name){
                   $temp = explode('/', $name);
             echo '<li>'.$temp[4].'<br />';
             echo '<ul>';
              foreach(glob($name.'/*.*') as $filename){
                   $temp = explode('/', $filename);
             echo '<li>'.$temp[5].'</li>';
             }
              echo '</ul></li>';
             }
             echo '</ul></li>';


        }
        echo '</ul>';
}
?>
